home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / UCRASM25.ARJ / HTOAM.ASM < prev    next >
Assembly Source File  |  1991-10-12  |  684b  |  40 lines

  1. StdGrp        group    stdlib,stddata
  2. stddata        segment    para public 'sldata'
  3. stddata        ends
  4. ;
  5. stdlib        segment    para public 'slcode'
  6.         assume    cs:stdgrp
  7.         extrn    sl_malloc:far,sl_htoa:far,sl_wtoa:far
  8. ;
  9. ;
  10. ;
  11. ; HTOAM-    Processes 8-bit hex value in AL.
  12. ;
  13.         public    sl_htoam
  14. sl_htoam    proc    far
  15.         push    cx
  16.         mov    cx, 3        ;Needs exactly three chars.
  17.         call    sl_malloc
  18.         pop    cx
  19.         jnc    GotoHTOA
  20.         ret
  21. GotoHTOA:    jmp    sl_htoa
  22. sl_htoam    endp
  23. ;
  24. ;
  25. ; WTOAM-    Processes 16-bit hex value in AX.
  26. ;
  27.         public    sl_wtoam
  28. sl_wtoam    proc    far
  29.         push    cx
  30.         mov    cx, 5        ;Needs exactly five chars.
  31.         call    sl_malloc
  32.         pop    cx
  33.         jnc    GotoWTOA
  34.         ret
  35. GotoWTOA:    jmp    sl_wtoa
  36. sl_wtoam    endp
  37. ;
  38. ;
  39. stdlib        ends
  40.         end